Optimal. Leaf size=298 \[ -\frac {4 a \cos ^3(c+d x) \sqrt {a+b \sin (c+d x)}}{21 b d}+\frac {2 \cos ^3(c+d x) (a+b \sin (c+d x))^{3/2}}{9 b d}-\frac {8 \left (4 a^4-15 a^2 b^2-21 b^4\right ) E\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )|\frac {2 b}{a+b}\right ) \sqrt {a+b \sin (c+d x)}}{315 b^4 d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}+\frac {32 a \left (a^4-4 a^2 b^2+3 b^4\right ) F\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}{315 b^4 d \sqrt {a+b \sin (c+d x)}}-\frac {4 \cos (c+d x) \sqrt {a+b \sin (c+d x)} \left (4 a \left (a^2-3 b^2\right )-3 b \left (a^2+7 b^2\right ) \sin (c+d x)\right )}{315 b^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.35, antiderivative size = 298, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 8, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {2774, 2941,
2944, 2831, 2742, 2740, 2734, 2732} \begin {gather*} -\frac {4 \cos (c+d x) \sqrt {a+b \sin (c+d x)} \left (4 a \left (a^2-3 b^2\right )-3 b \left (a^2+7 b^2\right ) \sin (c+d x)\right )}{315 b^3 d}+\frac {32 a \left (a^4-4 a^2 b^2+3 b^4\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}} F\left (\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{315 b^4 d \sqrt {a+b \sin (c+d x)}}-\frac {8 \left (4 a^4-15 a^2 b^2-21 b^4\right ) \sqrt {a+b \sin (c+d x)} E\left (\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{315 b^4 d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}+\frac {2 \cos ^3(c+d x) (a+b \sin (c+d x))^{3/2}}{9 b d}-\frac {4 a \cos ^3(c+d x) \sqrt {a+b \sin (c+d x)}}{21 b d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2774
Rule 2831
Rule 2941
Rule 2944
Rubi steps
\begin {align*} \int \cos ^4(c+d x) \sqrt {a+b \sin (c+d x)} \, dx &=\frac {2 \cos ^3(c+d x) (a+b \sin (c+d x))^{3/2}}{9 b d}+\frac {2 \int \cos ^2(c+d x) (b+a \sin (c+d x)) \sqrt {a+b \sin (c+d x)} \, dx}{3 b}\\ &=-\frac {4 a \cos ^3(c+d x) \sqrt {a+b \sin (c+d x)}}{21 b d}+\frac {2 \cos ^3(c+d x) (a+b \sin (c+d x))^{3/2}}{9 b d}+\frac {4 \int \frac {\cos ^2(c+d x) \left (4 a b+\frac {1}{2} \left (a^2+7 b^2\right ) \sin (c+d x)\right )}{\sqrt {a+b \sin (c+d x)}} \, dx}{21 b}\\ &=-\frac {4 a \cos ^3(c+d x) \sqrt {a+b \sin (c+d x)}}{21 b d}+\frac {2 \cos ^3(c+d x) (a+b \sin (c+d x))^{3/2}}{9 b d}-\frac {4 \cos (c+d x) \sqrt {a+b \sin (c+d x)} \left (4 a \left (a^2-3 b^2\right )-3 b \left (a^2+7 b^2\right ) \sin (c+d x)\right )}{315 b^3 d}+\frac {16 \int \frac {-\frac {1}{4} a b \left (a^2-33 b^2\right )-\frac {1}{4} \left (4 a^4-15 a^2 b^2-21 b^4\right ) \sin (c+d x)}{\sqrt {a+b \sin (c+d x)}} \, dx}{315 b^3}\\ &=-\frac {4 a \cos ^3(c+d x) \sqrt {a+b \sin (c+d x)}}{21 b d}+\frac {2 \cos ^3(c+d x) (a+b \sin (c+d x))^{3/2}}{9 b d}-\frac {4 \cos (c+d x) \sqrt {a+b \sin (c+d x)} \left (4 a \left (a^2-3 b^2\right )-3 b \left (a^2+7 b^2\right ) \sin (c+d x)\right )}{315 b^3 d}+\frac {\left (16 a \left (a^4-4 a^2 b^2+3 b^4\right )\right ) \int \frac {1}{\sqrt {a+b \sin (c+d x)}} \, dx}{315 b^4}+\frac {\left (4 \left (-4 a^4+15 a^2 b^2+21 b^4\right )\right ) \int \sqrt {a+b \sin (c+d x)} \, dx}{315 b^4}\\ &=-\frac {4 a \cos ^3(c+d x) \sqrt {a+b \sin (c+d x)}}{21 b d}+\frac {2 \cos ^3(c+d x) (a+b \sin (c+d x))^{3/2}}{9 b d}-\frac {4 \cos (c+d x) \sqrt {a+b \sin (c+d x)} \left (4 a \left (a^2-3 b^2\right )-3 b \left (a^2+7 b^2\right ) \sin (c+d x)\right )}{315 b^3 d}+\frac {\left (4 \left (-4 a^4+15 a^2 b^2+21 b^4\right ) \sqrt {a+b \sin (c+d x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \sin (c+d x)}{a+b}} \, dx}{315 b^4 \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}+\frac {\left (16 a \left (a^4-4 a^2 b^2+3 b^4\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \sin (c+d x)}{a+b}}} \, dx}{315 b^4 \sqrt {a+b \sin (c+d x)}}\\ &=-\frac {4 a \cos ^3(c+d x) \sqrt {a+b \sin (c+d x)}}{21 b d}+\frac {2 \cos ^3(c+d x) (a+b \sin (c+d x))^{3/2}}{9 b d}-\frac {8 \left (4 a^4-15 a^2 b^2-21 b^4\right ) E\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )|\frac {2 b}{a+b}\right ) \sqrt {a+b \sin (c+d x)}}{315 b^4 d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}+\frac {32 a \left (a^4-4 a^2 b^2+3 b^4\right ) F\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}{315 b^4 d \sqrt {a+b \sin (c+d x)}}-\frac {4 \cos (c+d x) \sqrt {a+b \sin (c+d x)} \left (4 a \left (a^2-3 b^2\right )-3 b \left (a^2+7 b^2\right ) \sin (c+d x)\right )}{315 b^3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.88, size = 233, normalized size = 0.78 \begin {gather*} \frac {32 \left (a b^2 \left (a^2-33 b^2\right ) F\left (\frac {1}{4} (-2 c+\pi -2 d x)|\frac {2 b}{a+b}\right )+\left (4 a^4-15 a^2 b^2-21 b^4\right ) \left ((a+b) E\left (\frac {1}{4} (-2 c+\pi -2 d x)|\frac {2 b}{a+b}\right )-a F\left (\frac {1}{4} (-2 c+\pi -2 d x)|\frac {2 b}{a+b}\right )\right )\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}+2 b \cos (c+d x) (a+b \sin (c+d x)) \left (-32 a^3+106 a b^2+10 a b^2 \cos (2 (c+d x))+b \left (24 a^2+203 b^2\right ) \sin (c+d x)+35 b^3 \sin (3 (c+d x))\right )}{1260 b^4 d \sqrt {a+b \sin (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1188\) vs.
\(2(340)=680\).
time = 2.14, size = 1189, normalized size = 3.99
method | result | size |
default | \(\text {Expression too large to display}\) | \(1189\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.15, size = 534, normalized size = 1.79 \begin {gather*} \frac {2 \, {\left (2 \, \sqrt {2} {\left (8 \, a^{5} - 33 \, a^{3} b^{2} + 57 \, a b^{4}\right )} \sqrt {i \, b} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 i \, a^{3} - 9 i \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) - 3 i \, b \sin \left (d x + c\right ) - 2 i \, a}{3 \, b}\right ) + 2 \, \sqrt {2} {\left (8 \, a^{5} - 33 \, a^{3} b^{2} + 57 \, a b^{4}\right )} \sqrt {-i \, b} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (-8 i \, a^{3} + 9 i \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) + 3 i \, b \sin \left (d x + c\right ) + 2 i \, a}{3 \, b}\right ) - 6 \, \sqrt {2} {\left (-4 i \, a^{4} b + 15 i \, a^{2} b^{3} + 21 i \, b^{5}\right )} \sqrt {i \, b} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 i \, a^{3} - 9 i \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 i \, a^{3} - 9 i \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) - 3 i \, b \sin \left (d x + c\right ) - 2 i \, a}{3 \, b}\right )\right ) - 6 \, \sqrt {2} {\left (4 i \, a^{4} b - 15 i \, a^{2} b^{3} - 21 i \, b^{5}\right )} \sqrt {-i \, b} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (-8 i \, a^{3} + 9 i \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (-8 i \, a^{3} + 9 i \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) + 3 i \, b \sin \left (d x + c\right ) + 2 i \, a}{3 \, b}\right )\right ) + 3 \, {\left (5 \, a b^{4} \cos \left (d x + c\right )^{3} - 8 \, {\left (a^{3} b^{2} - 3 \, a b^{4}\right )} \cos \left (d x + c\right ) + {\left (35 \, b^{5} \cos \left (d x + c\right )^{3} + 6 \, {\left (a^{2} b^{3} + 7 \, b^{5}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )\right )} \sqrt {b \sin \left (d x + c\right ) + a}\right )}}{945 \, b^{5} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a + b \sin {\left (c + d x \right )}} \cos ^{4}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\cos \left (c+d\,x\right )}^4\,\sqrt {a+b\,\sin \left (c+d\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________